package com.zycfc.zsf.boot.common.context;

import com.alibaba.ttl.*;
import java.util.*;

public class ZsfRootContext
{
    private static ThreadLocal<Map<String, String>> threadLocal;
    
    public static String put(final String key, final String value) {
        return ZsfRootContext.threadLocal.get().put(key, value);
    }
    
    public static String get(final String key) {
        return ZsfRootContext.threadLocal.get().get(key);
    }
    
    public static String remove(final String key) {
        return ZsfRootContext.threadLocal.get().remove(key);
    }
    
    static {
        ZsfRootContext.threadLocal = (ThreadLocal<Map<String, String>>)new TransmittableThreadLocal<Map<String, String>>() {
            protected Map<String, String> initialValue() {
                return new HashMap<String, String>();
            }
        };
    }
}
